<?php
$matches = array();
$node_id = false;
$search_query = false;
if (preg_match('/node\/([0-9]+)$/',$_SERVER['REQUEST_URI'],$matches)) {
    $node_id = array_pop($matches);
    require_once('view.php');
} else {
    $search_query = substr($_SERVER['REQUEST_URI'],1);
    require_once('search.php');
}
?>